package org.example.carsystem.domain;


import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysDept {
    /**部门id*/
    private Long deptId;
    /**父部门id*/
    private Long parentId;
    /**祖级列表*/
    private String ancestors;
    /**部门名称*/
    private String deptName;
    /**显示顺序*/
    private Long orderNum;
    /**负责人*/
    private String leader;
    /**联系电话*/
    private String phone;
    /**邮箱*/
    private String email;
    /**部门状态（0正常 1停用）*/
    private String status;
    /**删除标志（0代表存在 2代表删除）*/
    private String delFlag;
    /**创建者*/
    private String createBy;
    /**创建时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private String createTime;
    /**更新者*/
    private String updateBy;
    /**更新时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @TableField(exist = false)
    private List<SysDept> children;

}